home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 November / Chip Kasım 2000.iso / prog / share / 11 / setup.exe / %MAINDIR% / DEMOS / CIHTTP / HTTPEXP / servers / server.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-09-07  |  8.7 KB  |  274 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
  3. Begin VB.Form Server 
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "HTTP Server"
  6.    ClientHeight    =   3870
  7.    ClientLeft      =   1290
  8.    ClientTop       =   1575
  9.    ClientWidth     =   7980
  10.    Icon            =   "Server.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    PaletteMode     =   1  'UseZOrder
  16.    ScaleHeight     =   3870
  17.    ScaleWidth      =   7980
  18.    ShowInTaskbar   =   0   'False
  19.    Begin VB.PictureBox picFrame 
  20.       Appearance      =   0  'Flat
  21.       BorderStyle     =   0  'None
  22.       ForeColor       =   &H80000008&
  23.       Height          =   1890
  24.       Left            =   285
  25.       ScaleHeight     =   1890
  26.       ScaleWidth      =   4800
  27.       TabIndex        =   13
  28.       TabStop         =   0   'False
  29.       Top             =   1200
  30.       Width           =   4800
  31.       Begin VB.CheckBox optProxy 
  32.          Caption         =   "&Proxy Server is used"
  33.          Height          =   195
  34.          Left            =   1515
  35.          TabIndex        =   2
  36.          Top             =   165
  37.          Width           =   3720
  38.       End
  39.       Begin VB.TextBox txtServer 
  40.          Height          =   285
  41.          Index           =   2
  42.          Left            =   1515
  43.          TabIndex        =   8
  44.          Top             =   1305
  45.          Width           =   3270
  46.       End
  47.       Begin VB.TextBox txtServer 
  48.          Height          =   285
  49.          Index           =   0
  50.          Left            =   1515
  51.          TabIndex        =   6
  52.          Top             =   945
  53.          Width           =   3270
  54.       End
  55.       Begin VB.TextBox txtServer 
  56.          Height          =   285
  57.          Index           =   1
  58.          Left            =   1515
  59.          TabIndex        =   4
  60.          Top             =   585
  61.          Width           =   3270
  62.       End
  63.       Begin VB.Label lblGeneric 
  64.          Caption         =   "Default &URL:"
  65.          Height          =   195
  66.          Index           =   5
  67.          Left            =   30
  68.          TabIndex        =   7
  69.          Top             =   1335
  70.          Width           =   1470
  71.       End
  72.       Begin VB.Label lblGeneric 
  73.          BackStyle       =   0  'Transparent
  74.          Caption         =   "Host &Name:"
  75.          Height          =   195
  76.          Index           =   1
  77.          Left            =   30
  78.          TabIndex        =   5
  79.          Top             =   960
  80.          Width           =   1470
  81.       End
  82.       Begin VB.Label lblGeneric 
  83.          Caption         =   "Proxy &Server Name:"
  84.          Height          =   195
  85.          Index           =   4
  86.          Left            =   30
  87.          TabIndex        =   3
  88.          Top             =   615
  89.          Width           =   1470
  90.       End
  91.    End
  92.    Begin VB.TextBox txtAlias 
  93.       Height          =   285
  94.       Left            =   690
  95.       MaxLength       =   40
  96.       TabIndex        =   1
  97.       Top             =   150
  98.       Width           =   4425
  99.    End
  100.    Begin VB.CommandButton cmdCancel 
  101.       Cancel          =   -1  'True
  102.       Caption         =   "Cancel"
  103.       Height          =   375
  104.       Left            =   4155
  105.       TabIndex        =   10
  106.       Top             =   3390
  107.       Width           =   1125
  108.    End
  109.    Begin VB.CommandButton cmdOK 
  110.       Caption         =   "OK"
  111.       Default         =   -1  'True
  112.       Enabled         =   0   'False
  113.       Height          =   375
  114.       Left            =   2970
  115.       TabIndex        =   9
  116.       Top             =   3390
  117.       Width           =   1125
  118.    End
  119.    Begin ComctlLib.TabStrip tabServer 
  120.       Height          =   2550
  121.       Left            =   105
  122.       TabIndex        =   11
  123.       TabStop         =   0   'False
  124.       Top             =   705
  125.       Width           =   5175
  126.       _ExtentX        =   9128
  127.       _ExtentY        =   4498
  128.       _Version        =   327682
  129.       BeginProperty Tabs {0713E432-850A-101B-AFC0-4210102A8DA7} 
  130.          NumTabs         =   1
  131.          BeginProperty Tab1 {0713F341-850A-101B-AFC0-4210102A8DA7} 
  132.             Caption         =   "Server"
  133.             Key             =   "Server"
  134.             Object.Tag             =   ""
  135.             Object.ToolTipText     =   ""
  136.             ImageVarType    =   2
  137.          EndProperty
  138.       EndProperty
  139.    End
  140.    Begin VB.Label lblReadMe 
  141.       Caption         =   $"Server.frx":014A
  142.       ForeColor       =   &H00800000&
  143.       Height          =   2235
  144.       Index           =   2
  145.       Left            =   5415
  146.       TabIndex        =   15
  147.       Top             =   990
  148.       Visible         =   0   'False
  149.       Width           =   2505
  150.    End
  151.    Begin VB.Label lblReadMe 
  152.       Caption         =   "Notes:"
  153.       BeginProperty Font 
  154.          Name            =   "MS Sans Serif"
  155.          Size            =   8.25
  156.          Charset         =   0
  157.          Weight          =   700
  158.          Underline       =   0   'False
  159.          Italic          =   0   'False
  160.          Strikethrough   =   0   'False
  161.       EndProperty
  162.       ForeColor       =   &H00800000&
  163.       Height          =   195
  164.       Index           =   1
  165.       Left            =   5415
  166.       TabIndex        =   14
  167.       Top             =   735
  168.       Visible         =   0   'False
  169.       Width           =   570
  170.    End
  171.    Begin VB.Label lblReadMe 
  172.       Caption         =   "A simple set of information about an HTTP server. Expand as needed."
  173.       ForeColor       =   &H00800000&
  174.       Height          =   465
  175.       Index           =   0
  176.       Left            =   120
  177.       TabIndex        =   12
  178.       Top             =   3390
  179.       Visible         =   0   'False
  180.       Width           =   2700
  181.    End
  182.    Begin VB.Label lblGeneric 
  183.       Caption         =   "Alia&s:"
  184.       Height          =   195
  185.       Index           =   0
  186.       Left            =   150
  187.       TabIndex        =   0
  188.       Top             =   180
  189.       Width           =   465
  190.    End
  191. Attribute VB_Name = "Server"
  192. Attribute VB_GlobalNameSpace = False
  193. Attribute VB_Creatable = False
  194. Attribute VB_PredeclaredId = True
  195. Attribute VB_Exposed = False
  196. Option Explicit
  197. '----------------------------------------------------
  198. '<Purpose> Enables adding, and maintaing HTTP Servers.
  199. ' Can be easily made into an OLE server.
  200. '----------------------------------------------------
  201. '<Constant>------------------------------------------
  202. Const svrHostName       As Integer = 0
  203. Const svrProxyName      As Integer = 1
  204. Const svrDefaultURL     As Integer = 2
  205. '</Constant>-----------------------------------------
  206. '<Public>--------------------------------------------
  207. Public PressedOK        As Boolean
  208. Public ThisServer       As HTTPServer
  209. Public Mode             As Integer
  210. Public MyCaption        As String
  211. '</Public>-------------------------------------------
  212. Private Sub cmdCancel_Click()
  213.     PressedOK = False
  214.     Unload Me
  215. End Sub
  216. Private Sub cmdOK_Click()
  217.     '---- if in add mode, create a new class object
  218.     If (Mode = ciAdd) Then
  219.         Set ThisServer = New HTTPServer
  220.     End If
  221.     '---- save the information about the server
  222.     With ThisServer
  223.         .Alias = txtAlias
  224.         .UseProxy = optProxy.Value
  225.         .HostName = txtServer(svrHostName)
  226.         .ProxyName = txtServer(svrProxyName)
  227.         .DefaultURL = txtServer(svrDefaultURL)
  228.     End With
  229.         
  230.     PressedOK = True
  231.     Unload Me
  232. End Sub
  233. Private Sub Form_Load()
  234.     If (MyCaption <> "") Then
  235.         Me.Caption = MyCaption
  236.     End If
  237.         
  238.     If (Mode = ciProperties) Then
  239.         '---- display the Server information
  240.         With ThisServer
  241.             txtAlias = .Alias
  242.             optProxy.Value = .UseProxy
  243.             
  244.             txtServer(svrHostName) = .HostName
  245.             txtServer(svrProxyName) = .ProxyName
  246.             txtServer(svrDefaultURL) = .DefaultURL
  247.         End With
  248.     Else
  249.         txtServer(svrHostName) = "www."
  250.         txtServer(svrDefaultURL) = "/"
  251.     End If
  252.     Call GetWindowState(Me, "ciHTTPServerWindow", False)
  253.     Me.Width = 5490
  254. End Sub
  255. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  256.     If (Not (UnloadMode = vbFormCode)) Then
  257.         PressedOK = False
  258.     End If
  259.     Call SetWindowState(Me, "ciHTTPServerWindow")
  260. End Sub
  261. Private Sub Form_Terminate()
  262.     '---- explicitly clean up all objects
  263.     Set ThisServer = Nothing
  264. End Sub
  265. Private Sub txtAlias_Change()
  266.     cmdOK.Enabled = (txtAlias <> "")
  267. End Sub
  268. Private Sub txtAlias_GotFocus()
  269.     Call SelectText(txtAlias)
  270. End Sub
  271. Private Sub txtServer_GotFocus(Index As Integer)
  272.     Call SelectText(txtServer(Index))
  273. End Sub
  274.